package com.soft.entity;


import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

//商品实体类
public class Goods {


    private int id;//商品编号
    private String name;//商品名称
    private double price;//单价
    private Date createTime;//创建日期
    private int count;//商品数量
    private int type;//商品类别
    private String detail;//商品描述


    public Goods(){
    }

    public void setId(String id) {
        this.id = Integer.parseInt(id);
    }

    public int getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setPrice(String price) {
        this.price = Double.parseDouble(price);
    }

    public double getPrice() {
        return price;
    }

    public void setCreateTime(String createTime) throws ParseException {
        this.createTime = new SimpleDateFormat("yyyy-MM-dd").parse(createTime);
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCount(String count) {
        this.count = Integer.parseInt(count);
    }

    public int getCount() {
        return count;
    }

    public void setType(String type) {
        this.type = Integer.parseInt(type);
    }

    public int getType() {
        return type;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getDetail() {
        return detail;
    }
}
